Hi frds,
I am running into a small problem while closing a file shared on a remote machine.
This is the background :
I have a file on a remote machine.
I use "read" command to read the file and I later "flush" and "close" the stream.
I expect the file handle to be closed on the remote machine which is really not the case. File remains still open !
Further, I am using DOORS 9.1.0.2 client on a Windows XP SP2 machine.
Note : I have noticed this problem with DOORS 8.2 too !
Setup :
1) Create a folder "temp" on a remote machine, "\\ABC" and share it.
2) Create a file "MyFile.idx" under "temp" folder.( any extn for that matter )
Code :
//-----------------------------------------------------------------//
string s = "\\\\ABC/temp/MyFile.idx"; // I use 4 backslash to escape the "network path"
Stream st = read s;
string s_MyData = "";
st >> s_MyData;
print s_MyData;
flush st; // I flush the stream first to clear the buffers.
close st; // I close the stream.
//-----------------------------------------------------------------//
How to check the problem ->
1) Logon to the remote machine.
2) My Computer -> Manage -> System Tools -> Shared Folders -> Open Files.
Any soln for this is highly appreciated.
Regards,
Shyam
SystemAdmin - Fri May 22 08:10:13 EDT 2009 |